<?php


namespace app\api\validate;

use think\Validate;

class Driver extends Validate
{
    protected $rule =   [
        'driver_name'  => 'require',
        'driver_number'  => 'require',
        'id'=>'require',
    ];

    protected $message  =   [
        'driver_name.require' => '驾驶人姓名不得为空',
        'driver_number.require' => '驾驶证号不得为空',
        'id.require' => 'id不得为空',
    ];

    protected $scene = [
        'add' => ['driver_name','driver_number','type'],
        'edit' => ['driver_name','driver_number', 'id','type']
    ];

}